import { to } from "~/utils/wxapi";

Page({
  /**
   * 页面的初始数据
   */
  data: {
    img: [
      "../../image/banner1_02.png",
      "../../image/banner2_02.png",
      "../../image/banner3_02.png",
      "../../image/banner4_02.png",
    ],
    nav: [
      { img: "../../image/nav/nav1.png", title: "我要预约" },
      { img: "../../image/nav/nav2.png", title: "我要买单" },
      { img: "../../image/nav/nav3.png", title: "卡卷中心" },
      { img: "../../image/nav/nav4.png", title: "关于我们" },
    ],
    fu: [
      { img: "../../image/fu/jz.png", title: "家政保洁" },
      { img: "../../image/fu/ys.png", title: "保姆月嫂" },
      { img: "../../image/fu/bj.png", title: "搬家服务" },
      { img: "../../image/fu/yt.png", title: "衣服熨烫" },
    ],
  },

  goto(e: any) {
    const { i } = e.currentTarget.dataset;
    if (i === 0) {
      to("/pages/home/home");
    }
  },
  gotos() {
    to("/pages/home/home");
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {},

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {},

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {},

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {},

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {},
});
